Added documentation and C bindings for VBD. and VIF.runtime_properties.
authorEwan Mellor <ewan@xensource.com>
Thu, 12 Apr 2007 21:49:02 +0000 (22:49 +0100)
committerEwan Mellor <ewan@xensource.com>
Thu, 12 Apr 2007 21:49:02 +0000 (22:49 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
docs/xen-api/xenapi-datamodel.tex
tools/libxen/include/xen_vbd.h
tools/libxen/include/xen_vif.h
tools/libxen/src/xen_vbd.c
tools/libxen/src/xen_vif.c

index 721b01a0a82cc8b71a9d6dc111bedc2f38a1bbad..4aa8b3975eda489340a3327d2c3cb3a45bcb3132 100644 (file)
@@ -7742,6 +7742,7 @@ $\mathit{RW}$ &  {\tt MTU} & int & MTU in octets \\
 $\mathit{RO}_\mathit{run}$ &  {\tt currently\_attached} & bool & is the device currently attached (erased on reboot) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt status\_code} & int & error/success code associated with last attach-operation (erased on reboot) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt status\_detail} & string & error/success information associated with last attach-operation status (erased on reboot) \\
+$\mathit{RO}_\mathit{run}$ &  {\tt runtime\_properties} & (string $\rightarrow$ string) Map & Device runtime properties \\
 $\mathit{RW}$ &  {\tt qos/algorithm\_type} & string & QoS algorithm to use \\
 $\mathit{RW}$ &  {\tt qos/algorithm\_params} & (string $\rightarrow$ string) Map & parameters for chosen QoS algorithm \\
 $\mathit{RO}_\mathit{run}$ &  {\tt qos/supported\_algorithms} & string Set & supported QoS algorithms for this VIF \\
@@ -8221,6 +8222,38 @@ string
 }
 
 
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_runtime\_properties}
+
+{\bf Overview:} 
+Get the runtime\_properties field of the given VIF.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((string -> string) Map) get_runtime_properties (session_id s, VIF ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VIF ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(string $\rightarrow$ string) Map
+}
+
+
 value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -11108,6 +11141,7 @@ $\mathit{RW}$ &  {\tt type} & vbd\_type & how the VBD will appear to the guest (
 $\mathit{RO}_\mathit{run}$ &  {\tt currently\_attached} & bool & is the device currently attached (erased on reboot) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt status\_code} & int & error/success code associated with last attach-operation (erased on reboot) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt status\_detail} & string & error/success information associated with last attach-operation status (erased on reboot) \\
+$\mathit{RO}_\mathit{run}$ &  {\tt runtime\_properties} & (string $\rightarrow$ string) Map & Device runtime properties \\
 $\mathit{RW}$ &  {\tt qos/algorithm\_type} & string & QoS algorithm to use \\
 $\mathit{RW}$ &  {\tt qos/algorithm\_params} & (string $\rightarrow$ string) Map & parameters for chosen QoS algorithm \\
 $\mathit{RO}_\mathit{run}$ &  {\tt qos/supported\_algorithms} & string Set & supported QoS algorithms for this VBD \\
@@ -11688,6 +11722,38 @@ string
 }
 
 
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_runtime\_properties}
+
+{\bf Overview:} 
+Get the runtime\_properties field of the given VBD.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((string -> string) Map) get_runtime_properties (session_id s, VBD ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VBD ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(string $\rightarrow$ string) Map
+}
+
+
 value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
index 14a6685a9538d93fb421e621ec85075131561d20..d40af36796dc528a8f7c02995d86358e234f99fe 100644 (file)
@@ -78,6 +78,7 @@ typedef struct xen_vbd_record
     bool currently_attached;
     int64_t status_code;
     char *status_detail;
+    xen_string_string_map *runtime_properties;
     char *qos_algorithm_type;
     xen_string_string_map *qos_algorithm_params;
     struct xen_string_set *qos_supported_algorithms;
@@ -261,6 +262,13 @@ extern bool
 xen_vbd_get_status_detail(xen_session *session, char **result, xen_vbd vbd);
 
 
+/**
+ * Get the runtime_properties field of the given VBD.
+ */
+extern bool
+xen_vbd_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vbd vbd);
+
+
 /**
  * Get the qos/algorithm_type field of the given VBD.
  */
index 8a1cffb7bd313c52958961c9667b3679b26a3234..e9ad6b43696b43ae16cf5763796d4b717171967e 100644 (file)
@@ -75,6 +75,7 @@ typedef struct xen_vif_record
     bool currently_attached;
     int64_t status_code;
     char *status_detail;
+    xen_string_string_map *runtime_properties;
     char *qos_algorithm_type;
     xen_string_string_map *qos_algorithm_params;
     struct xen_string_set *qos_supported_algorithms;
@@ -251,6 +252,13 @@ extern bool
 xen_vif_get_status_detail(xen_session *session, char **result, xen_vif vif);
 
 
+/**
+ * Get the runtime_properties field of the given VIF.
+ */
+extern bool
+xen_vif_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vif vif);
+
+
 /**
  * Get the qos/algorithm_type field of the given VIF.
  */
@@ -333,7 +341,7 @@ xen_vif_remove_from_qos_algorithm_params(xen_session *session, xen_vif vif, char
 
 /**
  * Hotplug the specified VIF, dynamically attaching it to the running
- * VM
+ * VM.
  */
 extern bool
 xen_vif_plug(xen_session *session, xen_vif self);
@@ -341,7 +349,7 @@ xen_vif_plug(xen_session *session, xen_vif self);
 
 /**
  * Hot-unplug the specified VIF, dynamically unattaching it from the
- * running VM
+ * running VM.
  */
 extern bool
 xen_vif_unplug(xen_session *session, xen_vif self);
index cd63a4b52e99404c014b17e8d28c310d9aeeebb6..facedad94f66e793abcc54207113e06680e0a280 100644 (file)
@@ -72,6 +72,9 @@ static const struct_member xen_vbd_record_struct_members[] =
         { .key = "status_detail",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vbd_record, status_detail) },
+        { .key = "runtime_properties",
+          .type = &abstract_type_string_string_map,
+          .offset = offsetof(xen_vbd_record, runtime_properties) },
         { .key = "qos_algorithm_type",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vbd_record, qos_algorithm_type) },
@@ -109,6 +112,7 @@ xen_vbd_record_free(xen_vbd_record *record)
     xen_vdi_record_opt_free(record->vdi);
     free(record->device);
     free(record->status_detail);
+    xen_string_string_map_free(record->runtime_properties);
     free(record->qos_algorithm_type);
     xen_string_string_map_free(record->qos_algorithm_params);
     xen_string_set_free(record->qos_supported_algorithms);
@@ -334,6 +338,23 @@ xen_vbd_get_status_detail(xen_session *session, char **result, xen_vbd vbd)
 }
 
 
+bool
+xen_vbd_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vbd vbd)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vbd }
+        };
+
+    abstract_type result_type = abstract_type_string_string_map;
+
+    *result = NULL;
+    XEN_CALL_("VBD.get_runtime_properties");
+    return session->ok;
+}
+
+
 bool
 xen_vbd_get_qos_algorithm_type(xen_session *session, char **result, xen_vbd vbd)
 {
index 9a44129e4f7dfb9435c8166d52d36d8616fabef7..b0ea376a4b0867e6598fabf84325033ebe74da54 100644 (file)
@@ -67,6 +67,9 @@ static const struct_member xen_vif_record_struct_members[] =
         { .key = "status_detail",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vif_record, status_detail) },
+        { .key = "runtime_properties",
+          .type = &abstract_type_string_string_map,
+          .offset = offsetof(xen_vif_record, runtime_properties) },
         { .key = "qos_algorithm_type",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vif_record, qos_algorithm_type) },
@@ -105,6 +108,7 @@ xen_vif_record_free(xen_vif_record *record)
     xen_vm_record_opt_free(record->vm);
     free(record->mac);
     free(record->status_detail);
+    xen_string_string_map_free(record->runtime_properties);
     free(record->qos_algorithm_type);
     xen_string_string_map_free(record->qos_algorithm_params);
     xen_string_set_free(record->qos_supported_algorithms);
@@ -317,6 +321,23 @@ xen_vif_get_status_detail(xen_session *session, char **result, xen_vif vif)
 }
 
 
+bool
+xen_vif_get_runtime_properties(xen_session *session, xen_string_string_map **result, xen_vif vif)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vif }
+        };
+
+    abstract_type result_type = abstract_type_string_string_map;
+
+    *result = NULL;
+    XEN_CALL_("VIF.get_runtime_properties");
+    return session->ok;
+}
+
+
 bool
 xen_vif_get_qos_algorithm_type(xen_session *session, char **result, xen_vif vif)
 {